metabase: store associated object field in bytes #3971
Open
metabase: store associated object field in bytes #3971
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3971 +/- ##
==========================================
+ Coverage 28.00% 28.06% +0.06%
==========================================
Files 680 680
Lines 45293 45384 +91
==========================================
+ Hits 12686 12739 +53
- Misses 31429 31455 +26
- Partials 1178 1190 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| target := obj.AssociatedObject() | ||
| if target.IsZero() { | ||
| return nil | ||
| return fmt.Errorf("%s object has zero associated object", obj.Type()) |
Member
There was a problem hiding this comment.
Somewhat different problem, this nil was relevant before 5675b9d, now it's obsolete, yes.
789c655 to
bec2d00
Compare
roman-khimov
reviewed
May 4, 2026
Member
|
Changelog, btw. |
ad24350 to
820d230
Compare
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
roman-khimov
reviewed
May 4, 2026
820d230 to
b438be9
Compare
Store `__NEOFS__ASSOCIATE` in metabase as raw OID bytes instead of Base58.
Reject non-OID values for this attribute, add migration, update read/search
paths and cover the new layout in tests.
```
goos: linux
goarch: amd64
pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
Search/user_attribute-16 17.76µ ± 2% 15.10µ ± 2% -15.00% (p=0.000 n=10)
Search/associated_object_with_attribute-16 13.25µ ± 2% 15.20µ ± 8% +14.68% (p=0.000 n=10)
IsLocked/locked-16 11.464µ ± 2% 5.303µ ± 5% -53.75% (p=0.000 n=10)
IsLocked/unlocked-16 6.117µ ± 18% 3.112µ ± 2% -49.12% (p=0.000 n=10)
geomean 11.33µ 7.844µ -30.79%
│ old.txt │ new.txt │
│ B/op │ B/op vs base │
Search/user_attribute-16 2.547Ki ± 0% 2.445Ki ± 0% -3.99% (p=0.000 n=10)
Search/associated_object_with_attribute-16 2.203Ki ± 0% 2.305Ki ± 0% +4.61% (p=0.000 n=10)
IsLocked/locked-16 1.455Ki ± 0% 1.250Ki ± 0% -14.09% (p=0.000 n=10)
IsLocked/unlocked-16 945.0 ± 0% 840.0 ± 0% -11.11% (p=0.000 n=10)
geomean 1.657Ki 1.550Ki -6.42%
│ old.txt │ new.txt │
│ allocs/op │ allocs/op vs base │
Search/user_attribute-16 52.00 ± 0% 50.00 ± 0% -3.85% (p=0.000 n=10)
Search/associated_object_with_attribute-16 46.00 ± 0% 47.00 ± 0% +2.17% (p=0.000 n=10)
IsLocked/locked-16 33.00 ± 0% 29.00 ± 0% -12.12% (p=0.000 n=10)
IsLocked/unlocked-16 20.00 ± 0% 18.00 ± 0% -10.00% (p=0.000 n=10)
geomean 35.45 33.28 -6.11%
```
Closes #3926.
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
roman-khimov
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3926.